package com.domain;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/** 
* @ClassName: AppContext 
* @Description: TODO(������һ�仰��������������)
* @author wangxm
* @date 2014-6-16 ����4:17:14 
*/
public class AppContext {
	
	private static ApplicationContext app = null;
	
	private static AppContext appcontext = getApp();
	
	private AppContext(){

	}
	
	public static AppContext getApp(){
		if(appcontext == null)
		appcontext = new AppContext();
		if(app == null)
		app = new ClassPathXmlApplicationContext("config/appcontext.xml");
		return appcontext;
	}
	
	public static ApplicationContext getAppContext(){
		return  AppContext.getApp().app;
	}
}